import { SetMetadata } from "@nestjs/common";

export const ROLES_KEY = 'roles';
/**
 *   设置权限验证的的角色信息
 */
export const Roles = (...roles: string[]) => SetMetadata(ROLES_KEY, roles);


export const AUTH_KEY = 'auth';
/**
 *   无需token认证，jwtAuthGuard 守卫放行
 */
export const NotAuthorized = () => SetMetadata(AUTH_KEY,true);